package goods

import (
	"github.com/gogf/gf/frame/gmvc"
	"websshop/app/service/goods"
	"websshop/app/utils/response"
)

type Controller struct {
	gmvc.Controller
}

func (c *Controller) Index()  {

	c.View.Display("admin/goods/index.html")
}
func (c *Controller) List()  {

	data,err := goods.GetList()
	if err != nil {
		response.JsonExit(c.Request,422,"fail")
	}
	response.JsonExit(c.Request,0,"success",data)
}